package com.wmh.baseservice.admin.mapper;

import com.wmh.baseservice.admin.entity.AdRoleMenu;
import com.wmh.baseservice.common.mybatisplus.methods.CommonMapper;
import com.wmh.baseservice.common.mybatisplus.structure.LambdaQueryWrapperX;

import java.util.List;

/**
 * @author mmx generator
 * @since 2021-02-03
 */
public interface AdRoleMenuMapper extends CommonMapper<AdRoleMenu> {

    default List<AdRoleMenu> list(Long roleId){
        return selectList(new LambdaQueryWrapperX<AdRoleMenu>()
                .eq(AdRoleMenu::getRoleId,roleId));
    }

    default List<AdRoleMenu> list(List<Long> roleIds){
        return selectList(new LambdaQueryWrapperX<AdRoleMenu>()
                .in(AdRoleMenu::getRoleId,roleIds));
    }
}
